<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title></title>

    <!--  <link href="css/mui.min.css" rel="stylesheet"/> -->
    <link rel="stylesheet" href="../../lib/theme/style.css">
    <link rel="stylesheet" href="../../lib/iconfont/iconfont.css">
</head>

<body>
    <div id="app">
        <!-- <router-view></router-view> -->
        <!-- <iframe :src="srcs" frameborder="0"></iframe> -->
        <div class="bottomBtn">
            <ul>
                <li @click.stop="goto(1)" value="../../public/home/home.html">
                    <span class="iconfont icon-discoverfill"></span>
                    <span>童圈</span>
                </li>
                <li @click.stop="goto(2)" value="../../public/secretary/secretary.html">
                    <span class="iconfont icon-heart-fill"></span>
                    <span>小秘书</span>
                </li>
                <li @click.stop="goto(3)" value="../../public/extracurricular/extracurricular.html">
                    <span class="iconfont icon-read-fill"></span>
                    <span>课外</span>
                </li>
                <li @click.stop="goto(4)" value="../../public/my/my.html">
                    <span class="iconfont icon-peoplefill"></span>
                    <span>我的</span>
                </li>
            </ul>
        </div>

    </div>


    <script src="../../lib/js/mui.min.js"></script>
    <script src="../../lib/js/vue.min.js"></script>
    <script src="../../lib/js/jquery.min.js"></script>
    <script src="../../lib/js/vue-router.js"></script>
    <script src="../../lib/js/assembly.js"></script>
    <!-- <script src="lib/js/router.js"></script> -->
    <script src="../../lib/js/config.js"></script>
    <script type="text/javascript" charset="utf-8">
        var vm = new Vue({
            el: "#app",
            data: {
                srcs: '../../public/home/home.html',

            },
            created() {

            },
            methods: {
                goto(e) {
                    // console.log(e)
                    // mui.openWindow({
                    //     url: '/public/home/home.html',
                    //     id: 'home'
                    // });
                    if (e == 1) {
                        // console.log(e)
                        plus.webview.getWebviewById("home").show("slide-in-right", "200ms");
                        // var allPage = plus.webview.all();
                        // //首页窗口对象
                        // var thisPage = plus.webview.getLaunchWebview();
                        // //当前窗口对象
                        // var self = plus.webview.currentWebview();
                        // // 首页以及当前窗口对象，不关闭；
                        // for (var i = 0, len = allPage.length; i < len; i++) {
                        //     console.log(allPage[i].id)
                        //         //选定某一页不关wvs[i].id === localStorage.homeWebId
                        //     if (allPage[i].id === thisPage.id || allPage[i].id === self.id || allPage[i].id === "home" || allPage[i].id === "secretary" || allPage[i].id === "extracurricular") {
                        //         continue;
                        //     } else {
                        //         //关闭中间的窗口对象，为防止闪屏，不使用动画效果；
                        //         allPage[i].hide();
                        //     }
                        // }

                        plus.webview.getWebviewById("secretary").hide("slide-out-right", "200ms");
                        plus.webview.getWebviewById("extracurricular").hide("slide-out-right", "200ms");
                        plus.webview.getWebviewById("my").hide("slide-out-right", "200ms");

                    }
                    if (e == 2) {
                        plus.webview.getWebviewById("secretary").show("slide-in-right", "200ms");


                    }
                    if (e == 3) {
                        plus.webview.getWebviewById("extracurricular").show("slide-in-right", "200ms");


                    }
                    if (e == 4) {
                        plus.webview.getWebviewById("my").show("slide-in-right", "200ms");


                    }

                }
            }
        })
        mui.init({
            subpages: [{
                url: "../../public/home/home.html",
                id: "home",
                styles: {
                    top: "0px", //mui标题栏默认高度为45px；
                    bottom: "60px" //默认为0px，可不定义；
                }
            }],
            preloadPages: [
                //缓存其他页面
                {
                    url: "../../public/secretary/secretary.html",
                    id: "secretary",
                    styles: {
                        top: "0px",
                        bottom: "60px"
                    }
                }, {
                    url: "../../public/extracurricular/extracurricular.html",
                    id: "extracurricular",
                    styles: {
                        top: "0px",
                        bottom: "60px"
                    }
                }, {
                    url: "../../public/my/my.html",
                    id: "my",
                    styles: {
                        top: "0px",
                        bottom: "60px"
                    }
                }
            ]
        });
    </script>
</body>

</html>